package com.huarui.saleInvoiceItem.service;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.model.ListModel;
import org.ewaf.framework.service.BaseService;

import com.huarui.saleInvoiceItem.dao.ISaleInvoiceItemDao;

public class SaleInvoiceItemService extends BaseService {
	
	private ISaleInvoiceItemDao getDao(){
		return (ISaleInvoiceItemDao)dao;
	}
	
	@SuppressWarnings("unchecked")
	public List<Map> getListByCondition(Map map){
		return this.getDao().getListByCondition(map);
	}

	@SuppressWarnings("unchecked")
	public List<Map> getListByCondition(ListModel<Map> lm,Map map) {
		Integer total=getDao().getCountByCondition(map);
		lm.setTotal(total);
		map.put("listModel", lm);
		List<Map> retList=getDao().getListByCondition(map);
		lm.setResult(retList);
		return retList;
	}

}
